package com.spring;

import com.spring.config.SpringConfig;
import com.spring.dao.UserDao;
import com.spring.domain.User;
import com.spring.service.UserService;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class Main {
    public static void main(String[] args) {
        System.out.println("Hello world!");
        AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext(SpringConfig.class);
        UserService userService = ctx.getBean(UserService.class);
        User user = userService.getUser("1");
        System.out.println(user);
    }
}